let str1 = " [甲]test";
let str2 = " [乙]test";
let str3 = " [丙]test";
let str4 = " [自费]test";
let str5 = " test";
let str6 = "&nbsp;[甲]&nbsp;test";
let prefixRegex = /\[[甲|乙|丙|自]费?\]/;

console.log(prefixRegex.test(str1));
console.log(prefixRegex.test(str2));
console.log(prefixRegex.test(str3));
console.log(prefixRegex.test(str4));
console.log(prefixRegex.test(str5));
console.log(prefixRegex.test(str6));